/**
  ******************************************************************************
  * @file    Project/STM32F10x_StdPeriph_Template/main.c 
  * @author  MCD Application Team
  * @version V3.5.0
  * @date    08-April-2011
  * @brief   Main program body
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
  ******************************************************************************
  */  

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include "SEGGER_RTT.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
char Channel_1_Buffer[128];
char Channel_2_Buffer[128];
/* Private functions ---------------------------------------------------------*/

int main(void)
{
	SEGGER_RTT_Init();
	SEGGER_RTT_ConfigUpBuffer(1,"Channel_1_loging",Channel_1_Buffer,128,SEGGER_RTT_MODE_DEFAULT);
	SEGGER_RTT_ConfigUpBuffer(2,"Channel_2_loging",Channel_2_Buffer,128,SEGGER_RTT_MODE_DEFAULT);

	while (1)
  {
		SEGGER_RTT_printf(0,"%sHello%s World!\r\n",RTT_CTRL_TEXT_GREEN, RTT_CTRL_RESET);
		SEGGER_RTT_TerminalOut(1,"This is Terminal 1!\r\n");
		SEGGER_RTT_Write(1,"This is Channel 1! --> 123\r\n",28);
		SEGGER_RTT_Write(2,"This is Channel 2! --> ABC\r\n",28);
		for(int i=0;i<0xFFFFFF;i++);
  }
}

#ifdef  USE_FULL_ASSERT

/**
  * @brief  Reports the name of the source file and the source line number
  *         where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t* file, uint32_t line)
{ 
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
  }
}
#endif

/**
  * @}
  */


/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
